﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using SimpleRest.Core.Exceptions;

namespace SimpleRest.Core.Extensions.OAuth.Exceptions
{
    public class InvalidScopeException : WebExceptionBase, IOAuthException
    {
        public string ErrorUri { get; set; }

        public InvalidScopeException()
            : base("The requested scope is invalid, unknown, or malformed.") { }
        public InvalidScopeException(string errorUri)
            : this()
        {
            this.ErrorUri = errorUri;
        }

        public override System.Net.HttpStatusCode StatusCode
        {
            get { return System.Net.HttpStatusCode.BadRequest; }
        }

        public override string ErrorCode
        {
            get { return "invalid_scope"; }
        }

        public string OAuthMessage
        {
            get { return "invalid_scope"; }
        }
    }
}
